package com.chixing.service.impl;

import com.chixing.mapper.CustomerMapper;
import com.chixing.pojo.Customer;
import com.chixing.service.UserCenterService;
import com.chixing.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserCenterServieImpl implements UserCenterService {
    @Autowired
    private CustomerMapper customerMapper;
    @Override
    public ServerResponse getByTd(Integer custId) {
      Customer customer = customerMapper.selectByPrimaryKey(custId);
      if(customer!=null){
          return ServerResponse.getSuccess(customer);
      }else {
          return ServerResponse.getFail(null);
      }
    }
}
